home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-17 | 6.4 KB | 159 lines | [TEXT/ttxt] |
- HYPERIZE v1.1
-
- Freeware.
-
- Hyperize is a simple utility to convert text files into acceptable HTML. It is
- very small, very fast, and operates with the minimum of fuss. There is no limit
- on the number or size of files which it can process.
-
- WHAT IT DOES
-
- For each input file, Hyperize creates an output file with the same name as the
- input file plus ".html". The input file itself is not changed. Files whose name
- already ends in ".html" are skipped.
-
- Hyperize surrounds your text with opening and closing <HTML>, <HEAD> and <BODY>
- tags, and it uses the input file name to create a <TITLE>...</TITLE> tag. The rest
- depends on what mode you select. Hyperize can convert text in three different modes:
- normal, preformatted, and wrap.
-
- In all modes, Hyperize translates the special characters '<', '>' and '&' into
- their HTML escape codes, and additionally translates all characters >127 into
- appropriate escape codes or at least into something acceptable. For instance,
- accented characters like é become é and fancy quotes become the
- corresponding ordinary quotes. These translations are also made to the file
- name which is used as the title. (All the translations for characters >127 are
- in resources, so you can change them in ResEdit. They are in STR# resource 129.
- Whatever you do, make sure there are still exactly 128 of them!)
-
- In preformatted mode, this is all that Hyperize does apart from surrounding the
- body of the text with <PRE>...</PRE> tags. This is useful for program listings
- and various other purposes.
-
- In normal mode, Hyperize also does the following:
-
- - it translates single returns into <BR> and collapses multiple returns into <P>
- (it ignores intervening white space);
-
- - where a return is followed by spaces or tabs and then text, it writes a <P> tag
- instead of <BR>. This is useful for translating text where paragraph beginnings
- are indented but not preceded by a blank line;
-
- - wherever an output line gets longer than 72 characters, Hyperize replaces the
- next space or tab in the input with a return.
-
- In wrap mode, Hyperize does the same processing as for normal mode, except that
- it changes single returns into either spaces or returns, depending on the length
- of the output line. However, if the next line begins with white space, Hyperize
- translates the return into <P>, just as in normal mode. Wrap mode is intended for
- use on files created with text editors that use returns to separate lines rather
- than paragraphs.
-
-
- HOW TO USE IT
-
- You can use Hyperize either interactively or by dragging and dropping files onto
- it. When you drag and drop, Hyperize processes the files and then quits. You
- can drag and drop big clumps of files — Hyperize will skip those that are not
- text files or that end in ".html".
-
- In interactive mode, Hyperize awaits your commands until you choose Quit from the
- File menu or press Command-Q. You can translate files in interactive mode, but
- you'd most likely use it to set preferences.
-
- The preferences involve the choice of translation mode, the creator type of
- output files, and whether you want to be warned when a file name is too long.
- This can happen when Hyperize attempts to add ".html" to a file name that is
- already 26+ characters long. In this case, Hyperize repeatedly strips off the
- last character of the (original) file name until it finds a new unique name, and
- finally defaults to a base of the form "tempN" (where N is a digit string) if it
- stripped the name to nothing and still did not find a unique name. In either
- case, it adds ".html" to this base. If you've set warnings off, Hyperize proceeds
- to create and write a file of this name. If you've set warnings on, Hyperize
- offers a dialog which gives you the option to go with that name, choose a name
- yourself from the Standard File Dialog, skip the file, or cancel the whole
- operation. (I'm still not entirely happy with this interface -- it seems fussy.
- Future versions might handle it differently.)
-
- Hyperize stores your preferences in its resource fork. Therefore you can't run
- Hyperize (or at least you can't change preferences) from a locked volume. The
- default settings are mode=normal, warnings=on, creator='ttxt'.
-
- All literal strings, including those in warning and error messages, are stored in
- resources, so you can easily localize the application if you're prepared to do a
- bit of hacking in ResEdit. (They are in STR# resource 128.) The only exception is
- the contents of the About box. Please, if you do a localization, could you let
- me know so I can keep track of the various versions around.
-
- WHAT IT COSTS
-
- Nothing. Therefore I can't promise any support. But I do like e-mail, so you can
- send suggestions for improvement or even just paeans of praise.
-
-
- WHAT IT PROMISES
-
- Nothing, beyond converting your text files into bare-bones acceptable HTML. You
- will almost certainly have to go into the file and tweak headings, tables, and
- other formatting. Hyperize does not presume to know what you want your document
- to look like. Nor do I, for that matter.
-
-
- WHAT IT REQUIRES
-
- Hyperize requires System 7. Period. Oh, and a Macintosh.
-
-
- WHAT IT MIGHT GET EVENTUALLY
-
- My wish list for Hyperize includes:
-
- - recognize single lines not ending in punctuation and turn them into headings;
-
- - process whole folders;
-
- - add an option to turn tab-delimited data into HTML tables [hard];
-
- - make the translations of 8-bit characters conform to ISO 8879-1986 -- not
- till all browsers are conformant as well.
-
- These things may or may not happen eventually. That partly depends on you :-)
-
-
- ALTERNATIVES
-
- For a slightly different approach to the task, you might like to try Scott
- Kleper's HTML Markup. This is a more fully featured, memory-based text-to-HTML
- converter with many options. $15 shareware from:
-
- ftp://htc.rit.edu/pub/HTML-Markup-current.hqx
-
- There are many utilities that produce HTML apart from these two, most of them
- specialized to a particular format such as RTF, PostScript, or Excel. A fairly
- complete list can be found at:
-
- http://www.w3.org/hypertext/WWW/Tools/Filters.html
-
- VERSION HISTORY
-
- v1.1 (December 1995)
- - added translations for file name in title
- - added STR resource for character 255
- - fixed occurrences of '<' and '>' in >127 translations
- - fixed incorrect œ for æ
- - got rid of Œ and œ (not in HTML DTD)
- - changed wrong version number in this file
-
- v1.0 (November 1995)
- - initial release
-
- At any time, the current version is available at my web site:
-
- http://www.usyd.edu.au/~jcj/
-
-
- Jason Johnston
- <jcj@extro.ucc.su.oz.au>
-
- December 1995
-